package com.manager.controller

import com.netflix.hystrix.contrib.javanica.annotation.DefaultProperties
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand
import com.yfree.global.YController
import org.springframework.stereotype.Controller
import org.springframework.ui.ModelMap
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod

@Controller
@RequestMapping("/manager")
@DefaultProperties(defaultFallback = "yfree_defaultFallback")
class Controller_Manager : YController() {
    @HystrixCommand
    @RequestMapping("/index", method = [RequestMethod.GET])
    fun index(result: ModelMap): String {
        result["userList"] = arrayOf("张三", "李四")
        result["sex"] = 1
        return "index"
    }
}
